<div class="col-md-offset-2 col-md-6 main">
  <form class="form-horizontal css-form" name="form" novalidate>

      <div class="modal-header">
          <h5 class="modal-title">监控信息</h5>
      </div>

      <div class="modal-body">
          <div class="form-group">
            <label class="col-sm-2 control-label">标题</label>
            <div class="col-sm-9">
              <input required ng-model="monitor.title" type="text" class="form-control" >
            </div>
            </div>
            <div class="form-group">
              <label  class="col-sm-2 control-label">监控URL</label>
              <div class="col-sm-9">
                <input required ng-model="monitor.url" type="text" class="form-control"  >
              </div>
            </div>
  
            <div class="form-group">
              <label class="col-sm-2 control-label">间隔</label>
              <div class="col-sm-3">
                <div class="input-group">
                  <input ng-model="monitor.interval" type="text" class="form-control" >
                  <div class="input-group-addon">ms</div>
                </div>
              </div>
              <label  class="col-sm-2 control-label">超时</label>
              <div class="col-sm-3">
                <div class="input-group">
                  <input ng-model="monitor.timeout" type="text" class="form-control" >
                  <div class="input-group-addon">ms</div>
                </div>
              </div>              
            </div>  

            <div class="form-group">
              <label  class="col-sm-2 control-label">立即启动</label>
              <div class="col-sm-9">
                <label class="radio-inline">
                  <input type="radio" ng-model="monitor.autoStart" name="autoStart" value="true"> 是
                </label>
                <label class="radio-inline">
                  <input type="radio" ng-model="monitor.autoStart" name="autoStart" value="false">否
                </label>
              </div>
            </div>      

                           
                                       
      </div>

      <div class="modal-header">
          <h5 class="modal-title">验证方式</h5>
      </div>      

      <div class="modal-body">
        
        <div class="form-group">
          <label  class="col-sm-2 control-label">请求方式</label>
          <div class="col-sm-9">
            <label class="radio-inline">
              <input type="radio" ng-model="monitor.valid.method" name="method"  value="GET"> GET
            </label>
            <label class="radio-inline">
              <input type="radio" ng-model="monitor.valid.method" name="method" value="HEAD">HEAD
            </label>
          </div>
        </div>      

        <div class="form-group">
          <label class="col-sm-2 control-label">响应头</label>
          <div class="col-sm-9">
            <div class="input-group">
              <div class="input-group-addon">HTTP Code</div>
              <input required ng-model="monitor.valid.code" type="text" class="form-control"  >
            </div>
          </div>
        </div>          
         
      </div>

      <div class="modal-header">
          <h5 class="modal-title">告警通知</h5>
      </div>      

      <div class="modal-body">
        <div class="form-group">
          <label class="col-sm-2 control-label">触发条件</label>
          <div class="col-sm-7">
            <div class="input-group">
              <div class="input-group-addon">连续</div>
              <input required ng-model="monitor.alarm.continue" type="text" class="form-control">
              <div class="input-group-addon">次请求失败或超时</div>
            </div>
          </div>
      
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">通知用户</label>
          <div class="col-sm-9">
            <tags-input ng-model="monitor.alarm.users"
              placeholder="选择通知用户"
              maxTags="10"
              add-on-blur="false"
              display-property="name"
              addFromAutocompleteOnly="true"
              >
              <auto-complete 
              source="loadTags($query)"></auto-complete>
            </tags-input>
          </div>
      
        </div>


        
      </div>

      <div class="modal-footer">
          <button type="button"
             ng-disabled="form.$invalid"
           class="btn btn-primary" ng-click="confirm()">完成</button>
      </div>      

    </div>

      </form>      
</div>


